// let gifts = { name: '黑发', index: 1 }
//
// let insertGift = [{ name: '白发', index: 0 },{ name: '金发', index: 2 }]
//
// insertGift.splice(1,0,gifts)
// console.log(insertGift)



let insertGift = [
    { name: '白发', index: 0 },
    { name: '金发', index: 2 },
    { name: '金发', index: 2 },
    { name: '黑发', index: 2 },
    { name: 'hhh', index: 2 },
    { name: '金qqqqq发', index: 2 },
]
let result = insertGift.filter(t=>t.name)
console.log(result)







